import os
import json

path = r"D:\BaiduNetdiskDownload\小学问"
os.system(f"cd {path}")
for root, dir, files in os.walk(path):
    for file in files:
        new_name = file
        # print(file)
        new_name_A = new_name[:-15]
        new_name_B = new_name[-15:-4]
        new_name_C = new_name[-4:]
        print(new_name_A, "++", new_name_B, "++", new_name_C)
        if new_name_B == "微信 know811 ":
            new_name = new_name_A + new_name_C
            print(new_name_A, "*******",new_name_B, "-----", new_name_C)
            print(new_name)
            os.system(f'rename "{os.path.join(root, file)}" "{new_name}"')
